package homeworke.question19;

/**
 * Author：毕龙
 * Date: 2024/4/18 19:49
 */
public class Rect extends Shape{


    public Rect() {

    }

    public Rect(double longs, double width) {
        this.longs = longs;
        this.width = width;
    }

    private double longs;//长度
    private double width;//宽度

    @Override
    public double area() {
        return longs*width;
    }

    @Override
    public double girth() {
        return 2*(longs+width);
    }
}
